<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */
include_once("../config.inc.php");

$_LangPath = "7star_qselect";	//語言檔參數，務必放在最前面
include_once(__Member_Path."/logincheck_nodb.php");
include_once(__Language_Path."/selectlanguage_member.php");

$fp = @file(__Membertemplate_Path."/7star_qselect.html");
$fp = implode("", $fp);
$fp = setHTMLCharset($fp);
$fp = str_replace("{SelfFile}", $_SERVER["PHP_SELF"], $fp);
$fp = str_replace("{ShowAccount}", $_SESSION["Member_Info"] -> Account, $fp);
$fp = str_replace("{UserID}", $_SESSION["Member_Info"] -> ID, $fp);
$fp = str_replace("{sid}", $_data["sid"], $fp);

$intLID = (int)$_data["LottoID"];
if(empty($intLID))$intLID = 4;

include_once(__Common_Path."/SysParam.inc.php");
include_once(__Common_Path."/limit/LottoLimit_".$intLID.".inc.php");
include_once(__Common_Path."/betparam/BetParam_".$intLID.".inc.php");
@include_once(__Common_Path."/todaygame/Gamble".$intLID.".inc.php");
include_once(__Common_Path."/Lotto.inc.php");
include_once(__Modules_Path."/ChangeTime.lib.php");

//取出此期賽程
if(is_array($_arrGamble))list($intGID, $arrGamble) = each($_arrGamble);

$intTmp = $_SESSION["Member_Info"] -> CreditLine - $_arrMemStake["_SUM"];
$fp = str_replace("{CreditValue}", $intTmp, $fp);

$fp = str_replace("{LottoID}", $intLID, $fp);
$fp = str_replace("{Bet_Type}", $intBT, $fp);

if (!is_array($arrGamble)) {
	$strDate = "2100-01-01 01:01:01";
	$fp = preg_replace("/<!-- @ Number Start @ \/\/-->.+<!-- @ Number End @ \/\/-->/s", "", $fp);
	$isGameStart = "N";
} else {
	$strDate = TimeForm($arrGamble[GameDate], $arrGamble[EndGameTime], "Y-m-d H:i:s", "UToC");
	$isGameStart = "Y";
}
$fp = str_replace("{EndGameTime}", $strDate, $fp);
$fp = str_replace("{GambleID}", $intGID, $fp);
$fp = str_replace("{ShowChinaTime}", DateForm(date("Y-m-d"), date("H:i:s"), "m-d H:i:s", "UToC"), $fp);
$fp = str_replace("{ShowGameNo}", $arrGamble["SerialNo"], $fp);
$fp = str_replace("{ShowGameSec}", "", $fp);
$fp = str_replace("{isGameStart}", $isGameStart, $fp);

$intGap = 0;
$fp = str_replace("{time}", "05", $fp);

while(list($k, $v) = each($_str7Star_QSelect)){
	$fp = str_replace("{".$k."}", $v, $fp);
}

//輸出
WebOutputHTML($fp, 1);
?>